-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Radarr and Sonarr plugins (refresh/rename files) and "Remove streams by specified property" tweak #493
base: master
Are you sure you want to change the base?
Conversation
Your refresh plugins seem overly complicated. Might want to look at mine which I want to add to Tdarr when I have the time. |
Thank you for sharing, I think you are absolutely correct. I find JavaScript formatting very confusing and I am not really sure what the best practice is around logging and errors within this project. A lot of my code is plagued by attempts to bug fix and test while developing. Your code is much more readable, and you also managed to with both Arrs into the same plugin. I was not aware of the Your function does not allow both HTTP and HTTPS, but that would be a simple addition. |
Yeah the parse command is a bit finicky sometimes, as you have to make sure your filename is properly encoded. Http/https is decided by the user, as the input requires it to be entered. |
Uh, I am URI-encoding the string, but no results. I am trying multiple file names, but never any results, it's probably my setup.
Yes, I see that now! Thank you. |
Hey, I have written four new plugins and tweaked an existing one.
Remove streams by specified property
I am not sure what the rules are with editing other's plugins, but I needed it tweaked for my own purpose, so I want to share.
Because of my own actions, I had some files with corrupt subtitle streams. I wanted Tdarr to remove them based on missing stream properties. I was also worried that some edge-case could cause the plugins to remove streams I wanted to keep, so I added a filter input.
So the changes to "Remove streams by specified property" are:
Sonarr/Radarr
I had annoying issues where my show/movie managers (Sonarr/Radarr) would be out of sync because Tdarr altered the files. This could range from downloading a HEVC file to replace a H264 file, even though Tdarr already converted the file to HEVC, or the managers not deleting the files they are trying to delete because they don't know they were renamed. This caused a bunch of duplicate files.
These are four plugins in total, but two main actions. Refresh a show/movie and rename an episode/movie file. To be able to perform these API calls the plugin needs to find the show/movie ID in Sonarr/Radarr, and find the episode number for renaming. To find the show/movie ID the plugin performs an API search using the folder name of the file. To find the episode number it checks the file name.
So the requirements are a decent name of the parent folder, for example:
300 Rise of an Empire (2014)
, and the episode number in the episode file name, for example:Game of Thrones (2011) - S05E01 - The Wars to Come [265 Bluray-1080p][AC3 5.1][x265]-MZABI
. I have been using these plugins for months now with barely any issues.I hope these could be useful for others as well. They are currently used in my flows, and there seem to be no issues, but I will look into perhaps remaking them in the new format.